<template>
  <base-card>
    <!-- 搜索的子组件 -->
    <DoctorSearch></DoctorSearch>
    <!-- 表格列表 -->
    <DoctorList :columns="columns" @findDoctorDataAsync="findDoctorDataAsync"></DoctorList>
  </base-card>

</template>

<script setup>
import { onMounted } from 'vue';
import DoctorList from './DoctorList.vue';
import DoctorSearch from './DoctorSearch.vue';
import { useFindData } from '../../composables/findData';
import BaseCard from '../../components/base-card/BaseCard.vue';

const { findDoctorDataAsync } = useFindData()
onMounted(() => {
  findDoctorDataAsync()
})
// 表头的数据
const columns = [
  {
    label: '编号',
    prop: '_id',
  },
  {
    label: '头像',
    prop: 'avatar',
  },
  {
    label: '姓名',
    prop: 'name',
  },
  {
    label: '联系电话',
    prop: 'phone'
  },
  {
    label: '角色',
    prop: 'roleId',
  },
  {
    label: '所属团队',
    prop: 'teamIds',
  },
  {
    label: '所属机构',
    prop: 'organizationId',
    width: '190px'
  },
  {
    label: '状态',
    prop: 'is_del',
  },
  {
    label: '操作',
    prop: 'action',
    width: '240px'
  },
]

</script>

<style scoped></style>